package edu.neumont.pro180._2009_q2;

import edu.neumont.pro180._2009_q2.interfaces.ICommand;

public class ComplexCommand implements ICommand
{
	private ICommand[] commands;
	
	public ComplexCommand( ICommand ... commands )
	{
		this.commands = commands;
	}

	@Override
	public void execute()
	{
		for( int i=0; i < commands.length; i++ )
			commands[i].execute();
	}

	@Override
	public void undo()
	{
		for( int i=commands.length-1; i >= 0; i-- )
			commands[i].undo();
	}

	@Override
	public Square getDestination() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Square getOriginalSquare() {
		// TODO Auto-generated method stub
		return null;
	}

}
